]> permondes.de Git - Analog_Engine.git/blob - scripts/alpaca22 Quantum Well.LACE
2-dim gravity(swing-by)
[Analog_Engine.git] / scripts / alpaca22 Quantum Well.LACE
1 # Visualize the wave functions of a quantum well.
2 # This is a realization (with adaptations and corrections) of the application note alpaca_22 from https://analogparadigm.com.
3 # Schrödinger's equation is here to psi'' = -(U0+epsilon)*psi
4
5 coefficient(1): +1 -> l # left boundary of quantum well
6 coefficient(2): -1 -> r # right boundary of quantum well
7 coefficient(3): +1 -> +U0 # depth of quantum well
8 coefficient(4): +1 -> epsilon # energy of system
9 coefficient(5): +1 -> psi'0
10 coefficient(6): -1 -> -psi0
11 coefficient(8): -1 -> slowing_t # slowing down t
12
13 # First, generating a time ramp from -1 to +1
14 iintegrate slowing_t -> t
15 IC: +1
16
17 # Defining the boundaries of the quantum well
18 compare t, l -> well_left
19 GT0: -U0 # LT0 is open, thus =0
20 compare t, r -> well
21 LT0: well_left # GT0 is open, thus =0
22
23 # adding epsilon to the well and calculating the wave function
24 isum epsilon, well -> -(well+epsilon)
25 multiply -(well+epsilon), psi -> -(well+epsilon)*psi
26 iintegrate -(well+epsilon)*psi -> -psi' # input is psi''
27 IC: psi'0
28 iintegrate -psi' -> psi
29 IC: -psi0
30
31 multiply psi, psi -> psi^2
32 invert well -> -well
33
34 output(x): psi
35 output(y): psi^2
36 output(z): -well
37 output(u): t # also used as trigger